#ifndef XYPOSITIONGROUPBOX_H
#define XYPOSITIONGROUPBOX_H

#include <QtWidgets/QGroupBox>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QGridLayout>

class PositionGroupBox : public QGroupBox
{
    Q_OBJECT
public:
    PositionGroupBox(QWidget *parent = 0);
public slots:
    void setXPosition(double x);
    void setYPosition(double y);
    void setZPosition(double z);
    void setPosition(double x, double y, double z);
    void enableXYPosition(bool on);
private slots:
    void on_ButtonZeroX_click();
    void on_ButtonZeroY_click();
    void on_ButtonZeroZ_click();

private:
    void initContent();
    void initConnection();

    double m_xmmps;
    double m_ymmps;
    double m_zmmps;
    double m_xorg;
    double m_yorg;
    double m_zorg;

    QGridLayout *gridLayout;
    QLabel *labelPosX;
    QLabel *labelPosY;
    QLabel *labelPosZ;
    QLabel *labelPosXRel;
    QLabel *labelPosYRel;
    QLabel *labelPosZRel;

    QPushButton *pushButtonZeroX;
    QPushButton *pushButtonZeroY;
    QPushButton *pushButtonZeroZ;

    QLabel *labelX;
    QLabel *labelY;
    QLabel *labelZ;

    QLabel *labelXr;
    QLabel *labelYr;
    QLabel *labelZr;


};

#endif // XYPOSITIONGROUPBOX_H
